<div class="login-bg p-f">
    <div class="container">
        <div class="login-box">
            <form name="myForm"  role="form">
                <div class="form-group">
                    <div class="input-group" ng-class="{'has-error':myForm.phone.$dirty && myForm.phone.$invalid}">
                        <label class="input-group-addon"><span class="glyphicon glyphicon-user"></span></label>
                        <input type="text" class="form-control" name="phone" ng-model="user.phone" ng-required="true" ng-pattern="/^1[3|4|5|7|8][0-9]{9}$/"  placeholder="请输入手机号" autocomplete="off" placeholder="请输入手机号" />
                    </div>
                    <div ng-show="myForm.phone.$error.pattern && myForm.phone.$dirty" class="alert alert-danger help-block">
                        请输入正确的手机号！
                    </div>
                </div>

                <div class="form-group">
                    <div class="input-group">
                        <label class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></label>
                        <input type="password" name="password" ng-required="true" ng-model="user.password"  class="form-control" placeholder="请输入密码" />
                    </div>
                </div>

                <div class="form-group">
                    <button class="btn btn-success btn-block" ng-disabled="myForm.$invalid || user.phone == undefined || user.password.length == 0 || user.phone == undefined " ng-click="login()">登录</button>
                </div>

                <div class="form-group">
                    <button class="btn btn-info btn-block" ui-sref="register">注册</button>
                </div>
            </form>
        </div>
    </div>
</div>
